import request from '@/utils/request'

const api_name = 'admin/product/brand'


//查询全部
export const GetAllBrandList = () => {
  return request({
    url: `${api_name}/findAll`,
    method: 'get',
  })
}
//分页搜索
export const GetBrandListByPage = (pageNum, pageSize, queryDto) => {
    return request({
      url: `${api_name}/page`,
      method: 'post',
      data: {
        pageNum,
        pageSize,
        ...queryDto,
      },
    })
}
  //品牌添加
export const AddBrand = (brandDto) => {
  return request({
    url: `${api_name}/operate`,
    method: 'post',
    data:brandDto
  })

}

export const UpdateBrand = (brand) => {
  return request({
    url: `${api_name}/operate`,
    method: 'post',
    data:brand
  })
}

export const DeleteBrand = (deleteBrandDto) => {
  return request({
    url: `${api_name}/remove`,
    method: 'delete',
    data:deleteBrandDto
  })
}



